import request from '@/utils/request'

export function isExist(keyWord) {
  return request({
    url: `/saleManagement/register/Exist?keyWord=${keyWord}`,
    method: 'get'
  })
}

export function getOrderDetail(keyWord) {
  return request({
    url: `/saleManagement/register/getOrderDetail?keyWord=${keyWord}`,
    method: 'get'
  })
}

export function saveRegister(data) {
  return request({
    url: `/saleManagement/register/saveRegister`,
    method: 'post',
    data
  })
}

export function getRegisterInfo(bicycleId) {
  return request({
    url: `/saleManagement/register/getRegisterInfo?bicycleId=${bicycleId}`,
    method: 'get'
  })
}
